package com.nmh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nmh.entity.City;
import com.nmh.entity.DictType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface cityMapper extends BaseMapper<City> {
    @Select("select distinct name from city")
    List<String> getCityName();
    /*
    查询省份
     */
    @Select("select distinct name from city where name like '%省%'")
    List<String> getCity();
    /*
    查询市
     */
    @Select("select distinct name from city where name like '%市%' and parent_id=#{Id}")
    List<String> getCityShi(Integer id);
    /*
    根据省份获取市
     */
    @Select("select distinct name from city where name like '%区%' and parent_id=#{id}")
    List<String> getCityqu(Integer id);
}
